package com.text.mqtt_text.service.impl;

import com.text.mqtt_text.mapper.StudyMapper;
import com.text.mqtt_text.pojo.Memory;
import com.text.mqtt_text.pojo.StudyDTO;
import com.text.mqtt_text.service.StudyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class StudyServiceImpl implements StudyService {

    @Autowired
    StudyMapper studyMapper;


    @Override
    public List<StudyDTO> selectChatHistory() {
        return studyMapper.selectChatHistory();
    }

    @Override
    public Memory selectChatMemory() {
        Memory memory = new Memory();
        memory = studyMapper.selectChatMemory();
        return memory;
    }


}
